home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / ifl / TIFFReadRGBAImage.z / TIFFReadRGBAImage
Encoding:
Text File  |  1998-10-20  |  10.9 KB  |  198 lines

  1.  
  2.  
  3.  
  4. TTTTIIIIFFFFFFFFRRRReeeeaaaaddddRRRRGGGGBBBBAAAAIIIImmmmaaaaggggeeee((((3333TTTT))))                IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      TIFFReadRGBAImage - read and decode an image into a fixed-format raster
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttiiiiffffffffiiiioooo....hhhh>>>>
  13.      ####ddddeeeeffffiiiinnnneeee TTTTIIIIFFFFFFFFGGGGeeeettttRRRR((((aaaabbbbggggrrrr))))   ((((((((aaaabbbbggggrrrr)))) &&&& 0000xxxxffffffff))))
  14.      ####ddddeeeeffffiiiinnnneeee TTTTIIIIFFFFFFFFGGGGeeeettttGGGG((((aaaabbbbggggrrrr))))   ((((((((((((aaaabbbbggggrrrr)))) >>>>>>>> 8888)))) &&&& 0000xxxxffffffff))))
  15.      ####ddddeeeeffffiiiinnnneeee TTTTIIIIFFFFFFFFGGGGeeeettttBBBB((((aaaabbbbggggrrrr))))   ((((((((((((aaaabbbbggggrrrr)))) >>>>>>>> 11116666)))) &&&& 0000xxxxffffffff))))
  16.      ####ddddeeeeffffiiiinnnneeee TTTTIIIIFFFFFFFFGGGGeeeettttAAAA((((aaaabbbbggggrrrr))))   ((((((((((((aaaabbbbggggrrrr)))) >>>>>>>> 22224444)))) &&&& 0000xxxxffffffff))))
  17.      iiiinnnntttt TTTTIIIIFFFFFFFFRRRReeeeaaaaddddRRRRGGGGBBBBAAAAIIIImmmmaaaaggggeeee((((TTTTIIIIFFFFFFFF**** ttttiiiiffff,,,, uuuu____lllloooonnnngggg wwwwiiiiddddtttthhhh,,,, uuuu____lllloooonnnngggg hhhheeeeiiiigggghhhhtttt,,,, uuuu____lllloooonnnngggg**** rrrraaaasssstttteeeerrrr,,,, iiiinnnntttt ssssttttooooppppOOOOnnnnEEEErrrrrrrroooorrrr))))
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e reads a strip- or tile-based image into memory, storing
  21.      the result in the user supplied _r_a_s_t_e_r.  The raster is assumed to be an
  22.      array of _w_i_d_t_h times _h_e_i_g_h_t 32-bit entries, where _w_i_d_t_h must be less than
  23.      or equal to the width of the image (_h_e_i_g_h_t may be any non-zero size).  If
  24.      the raster dimensions are smaller than the image, the image data is
  25.      cropped to the raster bounds.  If the raster height is greater than that
  26.      of the image, then the image data are placed in the lower part of the
  27.      raster.  (Note that the raster is assume to be organized such that the
  28.      pixel at location (_x,_y) is _r_a_s_t_e_r[_y*_w_i_d_t_h+_x]; with the raster origin in
  29.      the lower-left hand corner.)
  30.  
  31.      Raster pixels are 8-bit packed red, green, blue, alpha samples.  The
  32.      macros _T_I_F_F_G_e_t_R, _T_I_F_F_G_e_t_G, _T_I_F_F_G_e_t_B, and _T_I_F_F_G_e_t_A should be used to
  33.      access individual samples.  Images without Associated Alpha matting
  34.      information have a constant Alpha of 1.0 (255).
  35.  
  36.      _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e converts non-8-bit images by scaling sample values.
  37.      Palette, grayscale, bilevel, CMYK, and YCbCr images are converted to RGB
  38.      transparently.  Raster pixels are returned uncorrected by any colorimetry
  39.      information present in the directory.
  40.  
  41.      The paramater _s_t_o_p_O_n_E_r_r_o_r specifies how to act if an error is encountered
  42.      while reading the image.  If _s_t_o_p_O_n_E_r_r_o_r is non-zero, then an error will
  43.      terminate the operation; otherwise _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e will continue
  44.      processing data until all the possible data in the image have been
  45.      requested.
  46.  
  47. NNNNOOOOTTTTEEEESSSS
  48.      In C++ the _s_t_o_p_O_n_E_r_r_o_r parameter defaults to 0.
  49.  
  50.      Samples must be either 1, 2, 4, 8, or 16 bits.  Colorimetric
  51.      samples/pixel must be either 1, 3, or 4 (i.e.  _S_a_m_p_l_e_s_P_e_r_P_i_x_e_l minus
  52.      _E_x_t_r_a_S_a_m_p_l_e_s).
  53.  
  54.      Palettte image colormaps that appear to be incorrectly written as 8-bit
  55.      values are automatically scaled to 16-bits.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. TTTTIIIIFFFFFFFFRRRReeeeaaaaddddRRRRGGGGBBBBAAAAIIIImmmmaaaaggggeeee((((3333TTTT))))                IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  69.  
  70.  
  71.  
  72.      _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e is just a wrapper around the more general
  73.      _T_I_F_F_R_G_B_A_I_m_a_g_e(3T) facilities.
  74.  
  75. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
  76.      1 is returned if the image was successfully read and converted.
  77.      Otherwise, 0 is returned if an error was encountered and _s_t_o_p_O_n_E_r_r_o_r is
  78.      zero.
  79.  
  80. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  81.      All error messages are directed to the _T_I_F_F_E_r_r_o_r(3T) routine.
  82.  
  83.      SSSSoooorrrrrrrryyyy,,,, ccccaaaannnn nnnnooootttt hhhhaaaannnnddddlllleeee %%%%dddd----bbbbiiiitttt ppppiiiiccccttttuuuurrrreeeessss.  The image had _B_i_t_s_P_e_r_S_a_m_p_l_e other
  84.      than 1, 2, 4, 8, or 16.
  85.  
  86.      SSSSoooorrrrrrrryyyy,,,, ccccaaaannnn nnnnooootttt hhhhaaaannnnddddlllleeee %%%%dddd----cccchhhhaaaannnnnnnneeeellll iiiimmmmaaaaggggeeeessss.  The image had _S_a_m_p_l_e_s_P_e_r_P_i_x_e_l
  87.      other than 1, 3, or 4.
  88.  
  89.      MMMMiiiissssssssiiiinnnngggg nnnneeeeeeeeddddeeeedddd """"PPPPhhhhoooottttoooommmmeeeettttrrrriiiiccccIIIInnnntttteeeerrrrpppprrrreeeettttaaaattttiiiioooonnnn"""" ttttaaaagggg.  The image did not have a
  90.      tag that describes how to display the data.
  91.  
  92.      NNNNoooo """"PPPPhhhhoooottttoooommmmeeeettttrrrriiiiccccIIIInnnntttteeeerrrrpppprrrreeeettttaaaattttiiiioooonnnn"""" ttttaaaagggg,,,, aaaassssssssuuuummmmiiiinnnngggg RRRRGGGGBBBB.  The image was missing
  93.      a tag that describes how to display it, but because it has 3 or 4
  94.      samples/pixel, it is assumed to be RGB.
  95.  
  96.      NNNNoooo """"PPPPhhhhoooottttoooommmmeeeettttrrrriiiiccccIIIInnnntttteeeerrrrpppprrrreeeettttaaaattttiiiioooonnnn"""" ttttaaaagggg,,,, aaaassssssssuuuummmmiiiinnnngggg mmmmiiiinnnn----iiiissss----bbbbllllaaaacccckkkk.  The image was
  97.      missing a tag that describes how to display it, but because it has 1
  98.      sample/pixel, it is assumed to be a grayscale or bilevel image.
  99.  
  100.      NNNNoooo ssssppppaaaacccceeee ffffoooorrrr pppphhhhoooottttoooommmmeeeettttrrrriiiicccc ccccoooonnnnvvvveeeerrrrssssiiiioooonnnn ttttaaaabbbblllleeee.  There was insufficient memory
  101.      for a table used to convert image samples to 8-bit RGB.
  102.  
  103.      MMMMiiiissssssssiiiinnnngggg rrrreeeeqqqquuuuiiiirrrreeeedddd """"CCCCoooolllloooorrrrmmmmaaaapppp"""" ttttaaaagggg.  A Palette image did not have a required
  104.      _C_o_l_o_r_m_a_p tag.
  105.  
  106.      NNNNoooo ssssppppaaaacccceeee ffffoooorrrr ttttiiiilllleeee bbbbuuuuffffffffeeeerrrr.  There was insufficient memory to allocate an
  107.      i/o buffer.
  108.  
  109.      NNNNoooo ssssppppaaaacccceeee ffffoooorrrr ssssttttrrrriiiipppp bbbbuuuuffffffffeeeerrrr.  There was insufficient memory to allocate an
  110.      i/o buffer.
  111.  
  112.      CCCCaaaannnn nnnnooootttt hhhhaaaannnnddddlllleeee ffffoooorrrrmmmmaaaatttt.  The image has a format (combination of
  113.      _B_i_t_s_P_e_r_S_a_m_p_l_e, _S_a_m_p_l_e_s_P_e_r_P_i_x_e_l, and _P_h_o_t_o_m_e_t_r_i_c_I_n_t_e_r_p_r_e_t_a_t_i_o_n) that
  114.      _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e can not handle.
  115.  
  116.      NNNNoooo ssssppppaaaacccceeee ffffoooorrrr BBBB&&&&WWWW mmmmaaaappppppppiiiinnnngggg ttttaaaabbbblllleeee.  There was insufficient memory to
  117.      allocate a table used to map grayscale data to RGB.
  118.  
  119.      NNNNoooo ssssppppaaaacccceeee ffffoooorrrr PPPPaaaalllleeeetttttttteeee mmmmaaaappppppppiiiinnnngggg ttttaaaabbbblllleeee.  There was insufficient memory to
  120.      allocate a table used to map data to 8-bit RGB.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134. TTTTIIIIFFFFFFFFRRRReeeeaaaaddddRRRRGGGGBBBBAAAAIIIImmmmaaaaggggeeee((((3333TTTT))))                IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  135.  
  136.  
  137.  
  138. BBBBUUUUGGGGSSSS
  139.      Orientations other than bottom-left, or top-left are not handled
  140.      correctly.
  141.  
  142. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  143.      _l_i_b_t_i_f_f(3T), _T_I_F_F_O_p_e_n(3T), _T_I_F_F_R_G_B_A_I_m_a_g_e(3T)
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                                                                         PPPPaaaaggggeeee 3333
  194.  
  195.  
  196.  
  197.